{% extends 'base.html' %}

{% block content %}
<div class="row">
  <div class="col-xs-12">
    <div class="col-xs-10 col-xs-offset-2">
      <h2>{% if form.instance.id %}Edit service{% else %}New service{% endif %}</h2>
    </div>
  </div>
</div>
<form class="form-horizontal" action="" method="post" role="form">
  {% include "cabotapp/_base_form.html" %}
  <div class="col-xs-12">
    <div class="form-group">
      <div class="col-xs-6 col-xs-offset-2">
        <button type="submit" class="btn btn-primary">Submit</button>
        <a href="{% url "dashboard" %}" class="btn">Back to dashboard</a>
      </div>
      {% if form.instance.id %}
      <div class="col-xs-4">
        <a class="btn btn-danger" href="{% url "delete-service" form.instance.id %}">Delete service</a>
      </div>
      {% endif %}
    </div>
  </div>
</form>
{% endblock %}

{% load compress %}
{% block js %}
{{ block.super }}
{% compress js %}
<script type="text/coffeescript">
</script>
{% endcompress %}
{% endblock %}
